home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / man / cat.1 / gzcat.1 < prev    next >
Text File  |  1995-07-25  |  20KB  |  397 lines

  1.  
  2.  
  3.  
  4.      GGGGZZZZIIIIPPPP((((1111))))               UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV ((((llllooooccccaaaallll))))               GGGGZZZZIIIIPPPP((((1111))))
  5.  
  6.  
  7.  
  8.      NNNNAAAAMMMMEEEE
  9.           gzip, gunzip, zcat - compress or expand files
  10.  
  11.      SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.           ggggzzzziiiipppp [ ----aaaaccccddddffffhhhhllllLLLLnnnnrrrrttttvvvvVVVV11119999 ] [----SSSS ssssuuuuffffffffiiiixxxx] [ _n_a_m_e ... ]
  13.           gggguuuunnnnzzzziiiipppp [ ----aaaaccccffffhhhhllllLLLLnnnnrrrrttttvvvvVVVV ] [----SSSS ssssuuuuffffffffiiiixxxx] [ _n_a_m_e ... ]
  14.           zzzzccccaaaatttt [ ----ffffhhhhLLLLVVVV ] [ _n_a_m_e ... ]
  15.  
  16.      DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  17.           _G_z_i_p reduces the size of the named files using Lempel-Ziv
  18.           coding (LZ77).  Whenever possible, each file is replaced by
  19.           one with the extension ....ggggzzzz,,,, while keeping the same ownership
  20.           modes, access and modification times.  (The default
  21.           extension is ----ggggzzzz for VMS, zzzz for MSDOS, OS/2 FAT and Atari.)
  22.           If no files are specified, the standard input is compressed
  23.           to the standard output.  _G_z_i_p will only attempt to compress
  24.           regular files.  In particular, it will ignore symbolic
  25.           links.
  26.  
  27.           If the new file name is too long for its file system, _g_z_i_p
  28.           truncates it and keeps the original file name in the
  29.           compressed file.  _G_z_i_p attempts to truncate only the parts
  30.           of the file name longer than 3 characters.  (A part is
  31.           delimited by dots.) If the name consists of small parts
  32.           only, the longest parts are truncated. For example, if file
  33.           names are limited to 14 characters, gzip.msdos.exe is
  34.           compressed to gzi.msd.exe.gz.  Names are not truncated on
  35.           systems which do not have a limit on file name length.
  36.  
  37.           Compressed files can be restored to their original form
  38.           using _g_z_i_p -_d or _g_u_n_z_i_p or _z_c_a_t. If the original name saved
  39.           in the compressed file is not suitable for its file system,
  40.           a new name is constructed from the original one to make it
  41.           legal.
  42.  
  43.           _g_u_n_z_i_p takes a list of files on its command line and
  44.           replaces each file whose name ends with .gz, -gz, .z, -z, _z
  45.           or .Z and which begins with the correct magic number with an
  46.           uncompressed file without the original extension.  _g_u_n_z_i_p
  47.           also recognizes the special extensions ....ttttggggzzzz and ....ttttaaaazzzz as
  48.           shorthands for ....ttttaaaarrrr....ggggzzzz and ....ttttaaaarrrr....ZZZZ respectively.  When
  49.           compressing, _g_z_i_p uses the ....ttttggggzzzz extension if necessary
  50.           instead of truncating a file with a ....ttttaaaarrrr extension.
  51.  
  52.           _g_u_n_z_i_p can currently decompress files created by _g_z_i_p, _z_i_p,
  53.           _c_o_m_p_r_e_s_s, _c_o_m_p_r_e_s_s -_H or _p_a_c_k. The detection of the input
  54.           format is automatic.  When using the first two formats,
  55.           _g_u_n_z_i_p checks a 32 bit CRC. For _p_a_c_k, _g_u_n_z_i_p checks the
  56.           uncompressed length. The standard _c_o_m_p_r_e_s_s format was not
  57.           designed to allow consistency checks. However _g_u_n_z_i_p is
  58.           sometimes able to detect a bad .Z file. If you get an error
  59.           when uncompressing a .Z file, do not assume that the .Z file
  60.  
  61.  
  62.  
  63.      Page 1                                           (printed 7/3/94)
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.      GGGGZZZZIIIIPPPP((((1111))))               UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV ((((llllooooccccaaaallll))))               GGGGZZZZIIIIPPPP((((1111))))
  71.  
  72.  
  73.  
  74.           is correct simply because the standard _u_n_c_o_m_p_r_e_s_s does not
  75.           complain. This generally means that the standard _u_n_c_o_m_p_r_e_s_s
  76.           does not check its input, and happily generates garbage
  77.           output.  The SCO compress -H format (lzh compression method)
  78.           does not include a CRC but also allows some consistency
  79.           checks.
  80.  
  81.           Files created by _z_i_p can be uncompressed by gzip only if
  82.           they have a single member compressed with the 'deflation'
  83.           method. This feature is only intended to help conversion of
  84.           tar.zip files to the tar.gz format. To extract zip files
  85.           with several members, use _u_n_z_i_p instead of _g_u_n_z_i_p.
  86.  
  87.           _z_c_a_t is identical to _g_u_n_z_i_p ----cccc.... (On some systems, _z_c_a_t may
  88.           be installed as _g_z_c_a_t to preserve the original link to
  89.           _c_o_m_p_r_e_s_s.) _z_c_a_t uncompresses either a list of files on the
  90.           command line or its standard input and writes the
  91.           uncompressed data on standard output.  _z_c_a_t will uncompress
  92.           files that have the correct magic number whether they have a
  93.           ....ggggzzzz suffix or not.
  94.  
  95.           _G_z_i_p uses the Lempel-Ziv algorithm used in _z_i_p and PKZIP.
  96.           The amount of compression obtained depends on the size of
  97.           the input and the distribution of common substrings.
  98.           Typically, text such as source code or English is reduced by
  99.           60-70%.  Compression is generally much better than that
  100.           achieved by LZW (as used in _c_o_m_p_r_e_s_s), Huffman coding (as
  101.           used in _p_a_c_k), or adaptive Huffman coding (_c_o_m_p_a_c_t).
  102.  
  103.           Compression is always performed, even if the compressed file
  104.           is slightly larger than the original. The worst case
  105.           expansion is a few bytes for the gzip file header, plus 5
  106.           bytes every 32K block, or an expansion ratio of 0.015% for
  107.           large files. Note that the actual number of used disk blocks
  108.           almost never increases.  _g_z_i_p preserves the mode, ownership
  109.           and timestamps of files when compressing or decompressing.
  110.  
  111.  
  112.      OOOOPPPPTTTTIIIIOOOONNNNSSSS
  113.           ----aaaa --------aaaasssscccciiiiiiii
  114.                Ascii text mode: convert end-of-lines using local
  115.                conventions. This option is supported only on some
  116.                non-Unix systems. For MSDOS, CR LF is converted to LF
  117.                when compressing, and LF is converted to CR LF when
  118.                decompressing.
  119.  
  120.           ----cccc --------ssssttttddddoooouuuutttt --------ttttoooo----ssssttttddddoooouuuutttt
  121.                Write output on standard output; keep original files
  122.                unchanged.  If there are several input files, the
  123.                output consists of a sequence of independently
  124.                compressed members. To obtain better compression,
  125.                concatenate all input files before compressing them.
  126.  
  127.  
  128.  
  129.      Page 2                                           (printed 7/3/94)
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.      GGGGZZZZIIIIPPPP((((1111))))               UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV ((((llllooooccccaaaallll))))               GGGGZZZZIIIIPPPP((((1111))))
  137.  
  138.  
  139.  
  140.           ----dddd --------ddddeeeeccccoooommmmpppprrrreeeessssssss --------uuuunnnnccccoooommmmpppprrrreeeessssssss
  141.                Decompress.
  142.  
  143.           ----ffff --------ffffoooorrrrcccceeee
  144.                Force compression or decompression even if the file has
  145.                multiple links or the corresponding file already
  146.                exists, or if the compressed data is read from or
  147.                written to a terminal. If the input data is not in a
  148.                format recognized by _g_z_i_p, and if the option --stdout
  149.                is also given, copy the input data without change to
  150.                the standard ouput: let _z_c_a_t behave as _c_a_t. If ----ffff is
  151.                not given, and when not running in the background, _g_z_i_p
  152.                prompts to verify whether an existing file should be
  153.                overwritten.
  154.  
  155.           ----hhhh --------hhhheeeellllpppp
  156.                Display a help screen and quit.
  157.  
  158.           ----llll --------lllliiiisssstttt
  159.                For each compressed file, list the following fields:
  160.  
  161.                    compressed size: size of the compressed file
  162.                    uncompressed size: size of the uncompressed file
  163.                    ratio: compression ratio (0.0% if unknown)
  164.                    uncompressed_name: name of the uncompressed file
  165.  
  166.                The uncompressed size is given as -1 for files not in
  167.                gzip format, such as compressed .Z files. To get the
  168.                uncompressed size for such a file, you can use:
  169.  
  170.                    zcat file.Z | wc -c
  171.  
  172.                In combination with the --verbose option, the following
  173.                fields are also displayed:
  174.  
  175.                    method: compression method
  176.                    crc: the 32-bit CRC of the uncompressed data
  177.                    date & time: time stamp for the uncompressed file
  178.  
  179.                The compression methods currently supported are
  180.                deflate, compress, lzh (SCO compress -H) and pack.  The
  181.                crc is given as ffffffff for a file not in gzip format.
  182.  
  183.                With --verbose, the size totals and compression ratio
  184.                for all files is also displayed, unless some sizes are
  185.                unknown. With --quiet, the title and totals lines are
  186.                not displayed.
  187.  
  188.           ----LLLL --------lllliiiicccceeeennnnsssseeee
  189.                Display the _g_z_i_p license and quit.
  190.  
  191.           ----nnnn --------nnnnoooo----nnnnaaaammmmeeee
  192.  
  193.  
  194.  
  195.      Page 3                                           (printed 7/3/94)
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.      GGGGZZZZIIIIPPPP((((1111))))               UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV ((((llllooooccccaaaallll))))               GGGGZZZZIIIIPPPP((((1111))))
  203.  
  204.  
  205.  
  206.                When compressing, do not save the original file name by
  207.                default. (The original name is always saved if the name
  208.                had to be truncated.) When decompressing, do not
  209.                restore the original file name if present: remove only
  210.                the _g_z_i_p suffix from the compressed file name.
  211.  
  212.           ----qqqq --------qqqquuuuiiiieeeetttt
  213.                Suppress all warnings.
  214.  
  215.           ----rrrr --------rrrreeeeccccuuuurrrrsssseeee
  216.                Travel the directory structure recursively. If any of
  217.                the file names specified on the command line are
  218.                directories, _g_z_i_p will descend into the directory and
  219.                compress all the files it finds there (or decompress
  220.                them in the case of _g_u_n_z_i_p ).
  221.  
  222.           ----SSSS ....ssssuuuuffff --------ssssuuuuffffffffiiiixxxx ....ssssuuuuffff
  223.                Use suffix .suf instead of .gz. Any suffix can be
  224.                given, but suffixes other than .z and .gz should be
  225.                avoided to avoid confusion when files are transferred
  226.                to other.  A null suffix forces gunzip to  try
  227.                decompression on all given files regardless of suffix,
  228.                as in:
  229.  
  230.                    gunzip -S "" *       (*.* for MSDOS)
  231.  
  232.                Previous versions of gzip used the .z suffix. This was
  233.                changed to avoid a conflict with _p_a_c_k(1).
  234.  
  235.           ----tttt --------tttteeeesssstttt
  236.                Test. Check the compressed file integrity.
  237.  
  238.           ----vvvv --------vvvveeeerrrrbbbboooosssseeee
  239.                Verbose. Display the name and percentage reduction for
  240.                each file compressed or decompressed.
  241.  
  242.           ----VVVV --------vvvveeeerrrrssssiiiioooonnnn
  243.                Version. Display the version number and compilation
  244.                options then quit.
  245.  
  246.           ----#### --------ffffaaaasssstttt --------bbbbeeeesssstttt
  247.                Regulate the speed of compression using the specified
  248.                digit #, where ----1111 or --------ffffaaaasssstttt indicates the fastest
  249.                compression method (less compression) and ----9999 or --------bbbbeeeesssstttt
  250.                indicates the slowest compression method (optimal
  251.                compression).  The default compression level is ----6666
  252.                (that is, biased towards high compression at expense of
  253.                speed).
  254.  
  255.      AAAADDDDVVVVAAAANNNNCCCCEEEEDDDD UUUUSSSSAAAAGGGGEEEE
  256.           Multiple compressed files can be concatenated. In this case,
  257.           _g_u_n_z_i_p will extract all members at once. For example:
  258.  
  259.  
  260.  
  261.      Page 4                                           (printed 7/3/94)
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.      GGGGZZZZIIIIPPPP((((1111))))               UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV ((((llllooooccccaaaallll))))               GGGGZZZZIIIIPPPP((((1111))))
  269.  
  270.  
  271.  
  272.                 gzip -c file1  > foo.gz
  273.                 gzip -c file2 >> foo.gz
  274.  
  275.           Then
  276.                 gunzip -c foo
  277.  
  278.           is equivalent to
  279.  
  280.                 cat file1 file2
  281.  
  282.           In case of damage to one member of a .gz file, other members
  283.           can still be recovered (if the damaged member is removed).
  284.           However, you can get better compression by compressing all
  285.           members at once:
  286.  
  287.                 cat file1 file2 | gzip > foo.gz
  288.  
  289.           compresses better than
  290.  
  291.                 gzip -c file1 file2 > foo.gz
  292.  
  293.           If you want to recompress concatenated files to get better
  294.           compression, do:
  295.  
  296.                 zcat old.gz | gzip > new.gz
  297.  
  298.      EEEENNNNVVVVIIIIRRRROOOONNNNMMMMEEEENNNNTTTT
  299.           The environment variable GGGGZZZZIIIIPPPP can hold a set of default
  300.           options for _g_z_i_p. These options are interpreted first and
  301.           can be overwritten by explicit command line parameters. For
  302.           example:
  303.                 for sh:    GZIP="-8 -v"; export GZIP
  304.                 for csh:   setenv GZIP "-8 -v"
  305.                 for MSDOS: set GZIP=-8 -v
  306.  
  307.           On Vax/VMS, the name of the environment variable is
  308.           GZIP_OPT, to avoid a conflict with the symbol set for
  309.           invocation of the program.
  310.  
  311.      SSSSEEEEEEEE AAAALLLLSSSSOOOO
  312.           znew(1), zcmp(1), zmore(1), zforce(1), gzexe(1), zip(1),
  313.           unzip(1), compress(1), pack(1), compact(1)
  314.  
  315.      DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
  316.           Exit status is normally 0; if an error occurs, exit status
  317.           is 1. If a warning occurs, exit status is 2.
  318.  
  319.           Usage: gzip [-cdfhlLnrtvV19] [-S suffix] [file ...]
  320.                   Invalid options were specified on the command line.
  321.           _f_i_l_e: not in gzip format
  322.                   The file specified to _g_u_n_z_i_p has not been
  323.                   compressed.
  324.  
  325.  
  326.  
  327.      Page 5                                           (printed 7/3/94)
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.      GGGGZZZZIIIIPPPP((((1111))))               UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV ((((llllooooccccaaaallll))))               GGGGZZZZIIIIPPPP((((1111))))
  335.  
  336.  
  337.  
  338.           _f_i_l_e: Corrupt input. Use zcat to recover some data.
  339.                   The compressed file has been damaged. The data up to
  340.                   the point of failure can be recovered using
  341.                           zcat file > recover
  342.           _f_i_l_e: compressed with _x_x bits, can only handle _y_y bits
  343.                   _F_i_l_e was compressed (using LZW) by a program that
  344.                   could deal with more _b_i_t_s than the decompress code
  345.                   on this machine.  Recompress the file with gzip,
  346.                   which compresses better and uses less memory.
  347.           _f_i_l_e: already has .gz suffix -- no change
  348.                   The file is assumed to be already compressed.
  349.                   Rename the file and try again.
  350.           _f_i_l_e already exists; do you wish to overwrite (y or n)?
  351.                   Respond "y" if you want the output file to be
  352.                   replaced; "n" if not.
  353.           gunzip: corrupt input
  354.                   A SIGSEGV violation was detected which usually means
  355.                   that the input file has been corrupted.
  356.           _x_x._x%
  357.                   Percentage of the input saved by compression.
  358.                   (Relevant only for ----vvvv and ----llll.)
  359.           -- not a regular file or directory: ignored
  360.                   When the input file is not a regular file or
  361.                   directory, (e.g. a symbolic link, socket, FIFO,
  362.                   device file), it is left unaltered.
  363.           -- has _x_x other links: unchanged
  364.                   The input file has links; it is left unchanged.  See
  365.                   _l_n(1) for more information. Use the ----ffff flag to force
  366.                   compression of multiply-linked files.
  367.  
  368.      CCCCAAAAVVVVEEEEAAAATTTTSSSS
  369.           When writing compressed data to a tape, it is generally
  370.           necessary to pad the output with zeroes up to a block
  371.           boundary. When the data is read and the whole block is
  372.           passed to _g_u_n_z_i_p for decompression, _g_u_n_z_i_p detects that
  373.           there is extra trailing garbage after the compressed data
  374.           and emits a warning by default. You have to use the --quiet
  375.           option to suppress the warning. This option can be set in
  376.           the GGGGZZZZIIIIPPPP environment variable as in:
  377.               for sh:    GZIP="-q"  tar xfz /dev/rmt/datn
  378.               for csh:   (setenv GZIP "-q"; tar xfz /dev/rmt/datn)
  379.  
  380.           In the above example, gzip is invoked implicitly by the -z
  381.           option of GNU tar. Make sure that the same block size (-b
  382.           option of tar) is used for reading and writing compressed
  383.           data on tapes.
  384.  
  385.      BBBBUUUUGGGGSSSS
  386.           The --list option reports incorrect sizes if they exceed 2
  387.           gigabytes.  The --list option reports sizes as -1 and crc as
  388.           ffffffff if the compressed file is on a non seekable media.
  389.  
  390.  
  391.  
  392.  
  393.      Page 6                                           (printed 7/3/94)
  394.  
  395.  
  396.  
  397.